﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SprayProcessSCADASystem.UserControls
{
    public partial class UserVarCurrentValue : UIUserControl
    {
        public UserVarCurrentValue()
        {
            InitializeComponent();
        }

        #region 设置设备名称
        private string _deviceVarName = "名称";

        [Description("设置或获取设备变量名称")]
        [Category("自定义属性")]
        [Browsable(true)]
        public string DeviceVarName
        {
            get { return _deviceVarName; }
            set
            {
                _deviceVarName = value;
                this.lbl_varName.Text = value;
            }
        }

        #endregion



        #region 设置设备变量值

        private float _varValue;
        [Description("设置或获取设备变量值")]
        [Category("自定义属性")]
        [Browsable(true)]
        public float VarValue
        {
            get { return _varValue; }
            set
            {
                _varValue = value;
                this.dl_value.Value = _varValue;
            }
        }

        #endregion


        #region 单位名称

        private string _unit = "单位";
        [Description("设置或获取单位")]
        [Category("自定义属性")]
        [Browsable(true)]
        public string Unit
        {
            get { return _unit; }
            set
            {
                _unit = value;
                this.lbl_unitName.Text = _unit;
            }
        }

        #endregion


        
    }
}
